package com.itrh.org.domain;

import cn.afterturn.easypoi.excel.annotation.Excel;
import cn.afterturn.easypoi.excel.annotation.ExcelEntity;
import cn.afterturn.easypoi.excel.annotation.ExcelIgnore;
import cn.afterturn.easypoi.excel.annotation.ExcelTarget;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.validation.constraints.Pattern;

/**
 * ClassName: Employee
 *
 * @author XHU_WHY
 * @version V1.0
 * @since 2024/4/2 16:33
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
@ExcelTarget(value = "employee")
public class Employee {
    private Long id;
    @Excel(name = "用户名")
    private String username;
    @Excel(name = "密码")
    private String password;
    @Excel(name = "邮箱", width = 50)
    @Pattern(regexp = "^[a-zA-Z\\d._%+-]+@[a-zA-Z\\d.-]+\\.[a-zA-Z]{2,}$", message = "邮箱格式错误")
    private String email;
    @Excel(name = "头像", width = 100)
    private String headImage;
    @Excel(name = "年龄")
    private Integer age;
    private Long departmentId;
    @ExcelEntity(name = "department")
    private Department department;
}
